close all;

global GUI

GUI.h = figure('position',[100 500 500 400],...
    'name','Hello GUI',...
    'numbertitle','off',...
    'menubar','none');


GUI.pushbutton = uicontrol('parent',GUI.h,...
    'style','pushbutton',...
    'string','click me',...
    'position',[0 0 80 40],...
    'visible','on',...
    'callback',@changeShow);

GUI.text = uicontrol('parent',GUI.h,...
    'style','text',...
    'string','Hello GUI',...
    'position',[0 360 100 40],...
    'fontsize',12,...
    'fontname','Consolas',...
    'visible','on');

GUI.edit = uicontrol('parent',GUI.h,...
    'style','edit',...
    'string','',...
    'position',[0 100 100 40],...
    'fontsize',12,...
    'fontname','Consolas',...
    'visible','on');

GUI.show = uicontrol('parent',GUI.h,...
    'style','text',...
    'string',0,...
    'position',[80 0 100 30],...
    'fontsize',12,...
    'fontname','Consolas',...
    'visible','on');


function changeShow(~,~)
global GUI
value = str2double(get(GUI.show,'string'));
set(GUI.show, 'string', value+1);
end
